<script src="web/assets/plugins/bootstrap-select2/select2.min.js" type="text/javascript"></script>
<script src="web/assets/plugins/jquery-datatable/js/jquery.dataTables.min.js" type="text/javascript" ></script>
<script src="web/assets/js/table_configuracion.js" type="text/javascript"></script>
<script src="./fuentes/view/respuesta/js/script_ajax_respuesta.js" type="text/javascript"></script>

<div class="clearfix"></div>
<div class="content">  
    <div class="row">


        <div class="col-md-12">
            <div class="grid simple ">
                
                <div class="grid-body no-border">
                    <h4><span class="semi-bold">Listado de Respuestas</span></h4>
                    
                    <br>
                    <table class="table table-hover table-bordered no-more-tables" id="respuestaTABLE">
                        <thead>
                            <tr>
                                <th class="text-center" style="width:1%">ID</th>
                                <th class="text-center" style="width:16%">Persona</th>
                                <th class="text-center" style="width:22%">Encuesta</th>
                                <th class="text-center" style="width:2%">Valoracion</th>
                                <th class="text-center" style="width:2%">Desconoce</th>
                                <th class="text-center" style="width:10%">Fecha Respuesta</th>
                            </tr>
                        </thead>
                        <tbody>
                            <?php foreach ($respuestas as $dato) { ?>
                                <tr>
                                    <td class="text-center"><?php echo $dato['id']; ?></td>
                                    <td class="text-left"><?php echo $dato['apenom'] . " - " . $dato['documento']; ?></td>
                                    <td class="text-left"><?php echo $dato['titulo'] . " - " . $dato['pregunta']; ?></td>
                                    <td class="text-center"><?php echo $dato['valoracion']; ?></td>
                                    <td class="text-center">
                                        <?php
                                        if ($dato["desconoce"] == 0) {
                                            echo "<span class='label label-warning'>NO</span>";
                                        } else {
                                            echo "<span class='label label-success'>SI</span>";
                                        }
                                        ?>
                                    </td>
                                    <td class="text-center"><?php echo $dato['fecha_hora']; ?></td>
                                </tr>
                            <?php } ?>

                        </tbody>
                    </table>
                </div>
            </div>
        </div>

    </div>
</div>